package com.xxmw.transaction.common.utils.symbolFormat.impl;

import com.xxmw.transaction.common.utils.symbolFormat.SymbolFormat;

/**
 * ok网交易对转换
 */
public class OkexSymbolFormat implements SymbolFormat {

    @Override
    public String symbolFormat(String baseCurrency, String quoteCurrency) {
        String base = baseCurrency.toUpperCase();
        String quote = quoteCurrency.toUpperCase();
        StringBuilder symbol = new StringBuilder();
        symbol.append(base).append("-").append(quote);
        return symbol.toString();
    }

    @Override
    public String symbolStandardization(String symbol) {
        symbol = symbol.toLowerCase();
        String[] split = symbol.split("-");
        return split[0]+split[1];
    }
}
